if !CLIENT then return end

local function gcommunicate_loadplugins(location)
	local files = file.FindInLua( "gcommunicate/plugins" .. location .. "/*" )

	if #files > 0 then
		for _, thefile in ipairs( files ) do
			if (thefile != "." and thefile != ".." and thefile != ".svn") then
				local strSplit = string.Explode(".", thefile)
				strSplit[2] = strSplit[2] or " "
				if (!string.find(strSplit[2],"lua")) then
					Msg("LOADING PLUGIN:" .. string.upper(thefile) .. "\n")
					gcommunicate_loadplugins(location .. "/" .. thefile)
				else
					if string.find(thefile, "cl_") then
						include("gcommunicate/plugins/" .. location .. "/" .. thefile)
					end				
				end
			end
		end
	end
	
	
	
end

gcommunicate_loadplugins("")